<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>回答-问答首页</title>
  <meta name="Keywords " content="$SiteKeywords " />
  <meta name="Description " content="$SiteDescription " />
  <link rel="stylesheet " type="text/css " href="css/bootstrap.min.css" />
  <link rel="stylesheet " type="text/css " href="css/globle.css " />
  <link rel="stylesheet " type="text/css " href="css/popupInsert.css" />
  <link rel="stylesheet " type="text/css " href="css/style.css " />
  <script src='js/jquery-2.0.3.js'></script>
  <script src='js/jquery.cookie.js'></script>
  <script src='js/popupInsert.js'></script>
  <script src='js/index.js'></script>
  <script type="text/javascript">
  $(function() {
    $("form").submit(function(ev) {
      ev.preventDefault();
      var data = $(this).serialize();
      data = data + "&querstion=" + $.cookie("querstion");
      console.log(data);
      $.post("/user/answer", data, function(res, status, xhr) {
        if (status == "success") {
          if (res.code == "success") {
            $.popup(res.content, function() {
              location.href = "/index.html"
            })
          } else {
            $.popup(res.content)
          }
        }
      })
    });
  });
  </script>
</head>

<body>
  <div class="h50"></div>
  <div id="nav">
    <nav class="nav">
      <!-- 用户下拉 -->
      <div class="user-info" style="display: none">
        <a href="javascript:;">个人资料</a>
        <a href="javascript:;">退出</a>
      </div>
      <div class="back"><span class="glyphicon glyphicon-chevron-left"></span></div>
      <div class="title">回答</div>
      <div class="user"><span class="glyphicon glyphicon-home fs18"></span>
      </div>
    </nav>
  </div>
  <main>
    <div class="ask-content"></div>
    <form role="form">
      <div class="form-group">
        <textarea class="form-control" name="content" rows="10" placeholder="请详细填写回答内容"></textarea>
      </div>
      <button type="submit" class="btn btn-block btn-success">提交回答</button>
    </form>
  </main>
</body>

</html>
